<?php
//sha1 md5_file hash
// echo md5_file('./images/1.jpg') . "<br/>";

const encty_pwd = 'f5d5252c5c2c5f99620f117f1114676a';
const encty_pwd1 = '55bc3d17fba20947d92bcf18adb396d6';  //123456的加密
const encty_pwd2 = 'b890c30d2b283c67cbed89d7fc130664';  //1的加密

/**
 * @param $str
 * @return string
 */
function md5Pwd($str) {
    return md5('%$#!' . $str . '@#$@#$!');
}

//密码值
$pwd = range(1,6);
var_dump(getStr($pwd, 3));
/**
 * 组合字符串，返回所有可能的密码字符串 类似笛卡尔积
 * $param pwd array 单个字符串列表
 * $param len int  密码长度
 * @return array
 */
function getStr($pwd, $len)
{
    if (1 == $len) {
        return $pwd;
    } else {
        foreach ($pwd as $str) {
            $strn = getStr($pwd, $len - 1);
            foreach ($strn as $str1) {
                $arr[] = $str . $str1;
            }
        }
        return $arr;
    }
}





